#include "UserSettings.h"

void UserSettings::fromJson(const QJsonObject& json, QStringList& errorList)
{
    BaseDocument::fromJson(json, errorList);
    lastFileDirPath = json.value("lastFileDirPath").toString(lastFileDirPath);
    lastTrayNo = json.value("lastTrayNo").toString(lastTrayNo);
}

QJsonObject UserSettings::toJson() const
{
    QJsonObject json = BaseDocument::toJson();

    json.insert("lastFileDirPath", lastFileDirPath);
    json.insert("lastTrayNo", lastTrayNo);

    return json;
}
